<template>
    <div>
        <el-dialog title="公告详情" :visible.sync="dialogVisibles" width="40%" :before-close="handleClose" center>
            <el-descriptions>
                <el-descriptions-item>{{form.title}}</el-descriptions-item>
            </el-descriptions>
            <el-descriptions>
                <el-descriptions-item label="添加时间">{{form.addtime}}</el-descriptions-item>
            </el-descriptions>
            <el-image style="width: 700px; height: 600px" :src="IMGURL+form.picture" >
            </el-image>
            <el-descriptions>
                <el-descriptions-item>{{form.content}}</el-descriptions-item>
            </el-descriptions>
        </el-dialog>
    </div>
</template>

<script>
// 图片路径
import { IMGURL } from "@/api/config"
export default {
    props: {
        dialogVisibles: {
            type: Boolean,
            default: false
        },
        handleClickdata: {
            type: Object,
            default: () => { }
        }
    },
    data() {
        return {
            IMGURL:IMGURL,
            form: {
                picture:[]
            }
        }
    },
    
    watch:{
        handleClickdata:{
            handler(val){
                if(val){
                    for(let i in val){
                        this.form[i] = val[i]
                    }
                }
            }
        }
    },
    methods: {
        handleClose(done) {
            this.$confirm('确认关闭？')
                .then(_ => {
                    this.$emit("iscloses", false)
                })
                .catch(_ => { });
        }
    }
}
</script>

<style lang="scss" scoped>

</style>